package com.zts.modules.sys.entity.model;

import com.zts.base.entity.EntityModel;
import com.zts.modules.sys.entity.Role;
import com.zts.util.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.BeanUtils;

/**
 * Created by lily on 2017/6/13.
 */
public class RoleModel extends EntityModel<Role> {
    @ApiModelProperty(value = "角色名称")
    private String roleName;
    @ApiModelProperty(value = "角色类型")
    private String type;
    @ApiModelProperty(value = "状态")
    private String status;

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Override
    public Role transEntity() {
        Role role = new Role();
        String[] emptyProperties = BeanUtil.getNullPropertyNames(this);
        BeanUtils.copyProperties(this, role, emptyProperties);
        return role;
    }

    @Override
    public Role transEntity(Role entity) {
        String[] emptyProperties = BeanUtil.getNullPropertyNames(this);
        BeanUtils.copyProperties(this, entity, emptyProperties);
        return entity;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
